home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1994
/
MacHack 1994.toast
/
MacHack™94
/
Talks & Papers
/
Timothy Knox
/
yerk 3.66
/
Module source
/
vol
< prev
Wrap
Text File
|
1994-06-24
|
1KB
|
44 lines
\ Volume level calls
\ 7/26/84 CBD Version 1.0
\ 1/01/85 rw FlushVol
\ 1/01/94 rfl clrfcb to clear: ffcb
\ get info for default vol - leave vol name at pad
: volinfo { -- fcode }
0 ffcb 22 + w!
0 ffcb 28 + w!
HFS? IF
9 ffcb +base dirfind
ELSE ffcb fcall pbgetvinfo
then ;
\ ( -- #files )
: filecount volinfo drop
HFS? IF ffcb 52 + w@
ELSE ffcb 40 + w@
THEN ;
\ ( file# -- b ) leave name of file at pad
: Getidxfile { \ dirid -- }
fFcb 28 + w! \ set file index
pad +base fFcb 18 + ! \ filename addr
pad 64 blanks getdirid: ffcb -> dirid
fFcb fcall PBHGetFInfo
0= IF true ELSE false THEN
dirid setdirid: ffcb
13 pad count + 1+ c! ;
\ Print directory for current volume
: Dir
0 -> curs clear: fFcb Filecount 1+ 1
." Directory for Volume: "
Pad count type cr
DO I Getidxfile Pad count Type CR ?Pause LOOP
Filecount . ." Files." CR 1 -> curs ;
: FlushVol
clear: fFcb
volinfo abort" GetVolInfo failed"
0 fFcb 12 + !
fFcb fcall PBFlushVol abort" FlushVol failed"
;